import { uDb, cline } from 'sui';
import { g_wsn } from 'db/state';

const load_pair = (hDone, setMain) => {
    const wsn = g_wsn();

    uDb(hDone, `file/read/select_${wsn}`,
        {
            line: cline(),
        },
        r => {
            const pair = r["pair"];
            setMain(pair);
        }, e => setMain(null));
};

export {load_pair};
